# 使用break退出循环

prompt = "\nPlease enter the name of a city you have visited:"
prompt += "\n(Enter 'quit' when you are finished.) "

while True:
    # 等待用户输入
    city = input(prompt)
    
    if city == 'quit':
        break
    else:
        print(f"I'd love to go to {city.title()}!")

'''

Please enter the name of a city you have visited:
(Enter 'quit' when you are finished.) lucky
I'd love to go to Lucky!

Please enter the name of a city you have visited:
(Enter 'quit' when you are finished.) quit
'''       
